package org.jeecg.entity.charge;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.enums.common.PayTypeEnum;
import org.jeecg.vo.charge.ChargeBillsJump;
import org.jeecg.vo.charge.ChargeBillsJumpAll;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.List;

/**
 * @Description: 票据
 * @Author: jeecg-boot
 * @Date:   2019-08-08
 * @Version: V1.0
 */
@Data
@TableName("charge_invoice")
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="charge_invoice对象", description="票据")
public class ChargeInvoice {
    
	/**id*/
	@TableId(type = IdType.ID_WORKER_STR)
    @ApiModelProperty(value = "id")
	private String id;
	/**小区ID*/
	//@Excel(name = "小区ID", width = 15)
    @ApiModelProperty(value = "小区ID")
	private String projectId;
	/**发票号码*/
	@Excel(name = "票据编号", width = 15)
    @ApiModelProperty(value = "发票号码")
	private String invoiceHm;
	/**发票代码（入库单编号）*/
	@Excel(name = "票据簿编号", width = 15)
    @ApiModelProperty(value = "发票代码（入库单编号）")
	private String invoiceDm;
	/**开票部门*/
	//@Excel(name = "开票部门", width = 15)
    @ApiModelProperty(value = "开票部门")
	private String invoiceOfficeid;
	/**开票日期*/
	@Excel(name = "开票日期", width = 20, format = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "开票日期")
	private java.util.Date makeInvoiceDate;
	/**付款人*/
	@Excel(name = "付款人", width = 15)
    @ApiModelProperty(value = "付款人")
	private String payer;
	/**金额*/
	//@Excel(name = "金额", width = 15)
    @ApiModelProperty(value = "金额")
	private Double money;
	/**预开标识*/
	//@Excel(name = "预开标识", width = 15)
    @ApiModelProperty(value = "预开标识")
	private String preOpen;
	/**收款日期*/
	@Excel(name = "收款日期", width = 20, format = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "收款日期")
	private java.util.Date zjSkrq;
	/**开票人*/
	@Excel(name = "开票人", width = 15)
    @ApiModelProperty(value = "开票人")
	private String invoiceMan;
	/**收款人*/
	@Excel(name = "收款人", width = 15)
    @ApiModelProperty(value = "收款人")
	private String payee;
	/**作废日期*/
	//@Excel(name = "作废日期", width = 20, format = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "作废日期")
	private java.util.Date scrapDate;
	/**作废人*/
	//@Excel(name = "作废人", width = 15)
    @ApiModelProperty(value = "作废人")
	private String scrapMan;
	/**作废原因*/
	//@Excel(name = "作废原因", width = 15)
    @ApiModelProperty(value = "作废原因")
	private String scrapDes;
	/**核销日期*/
	//@Excel(name = "核销日期", width = 20, format = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "核销日期")
	private java.util.Date cancelDate;
	/**核销人*/
	//@Excel(name = "核销人", width = 15)
    @ApiModelProperty(value = "核销人")
	private String cancelUser;
	/**付款方式*/
	//@Excel(name = "收款方式", width = 15)
    @ApiModelProperty(value = "付款方式")
	private Integer payMethod;
	@Excel(name = "收款方式", width = 15)
	@TableField(exist = false)
	private String payMethodStr;

	/**收款凭证编号*/
	@Excel(name = "房间名称", width = 15)
    @ApiModelProperty(value = "收款凭证编号")
	private String zjSkpzDh;
	/**内换日期*/
	//@Excel(name = "内换日期", width = 20, format = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "内换日期")
	private java.util.Date replaceDate;
	/**内换票据编号*/
	//@Excel(name = "内换票据编号", width = 15)
    @ApiModelProperty(value = "内换票据编号")
	private String replaceInvoiceHm;
	/**内换凭证编号*/
	//@Excel(name = "内换凭证编号", width = 15)
    @ApiModelProperty(value = "内换凭证编号")
	private String replacePzDh;
	/**对应内换入库单编号*/
	//@Excel(name = "对应内换入库单编号", width = 15)
    @ApiModelProperty(value = "对应内换入库单编号")
	private String replaceInvoiceDm;
	/**开票税号*/
	//@Excel(name = "开票税号", width = 15)
    @ApiModelProperty(value = "开票税号")
	private String ein;
	/**银行账号*/
	//@Excel(name = "银行账号", width = 15)
    @ApiModelProperty(value = "银行账号")
	private String account;
	/**地址*/
	//@Excel(name = "地址", width = 15)
    @ApiModelProperty(value = "地址")
	private String address;
	/**tel*/
	//@Excel(name = "tel", width = 15)
    @ApiModelProperty(value = "tel")
	private String tel;
	/**email*/
	//@Excel(name = "email", width = 15)
    @ApiModelProperty(value = "email")
	private String email;
	/**税额*/
	@Excel(name = "税额", width = 15)
    @ApiModelProperty(value = "税额")
	private Double tax;
	/**对应业主ID*/
	//@Excel(name = "对应业主ID", width = 15)
    @ApiModelProperty(value = "对应业主ID")
	private String customerId;
	/**对应租户ID*/
	//@Excel(name = "对应租户ID", width = 15)
	@ApiModelProperty(value = "对应租户ID")
	private String rentId;
	/**登记车位ID*/
	//@Excel(name = "登记车位ID", width = 15)
    @ApiModelProperty(value = "登记车位ID")
	private String djId;
	/**产权车位ID*/
	//@Excel(name = "产权车位ID", width = 15)
    @ApiModelProperty(value = "产权车位ID")
	private String cwId;
	/**PDF地址*/
	//@Excel(name = "PDF地址", width = 15)
    @ApiModelProperty(value = "PDF地址")
	private String pdfUrl;
	/**微信发票地址*/
	//@Excel(name = "微信发票地址", width = 15)
    @ApiModelProperty(value = "微信发票地址")
	private String spUrl;
	/**创建者*/
	//@Excel(name = "创建者", width = 15)
    @ApiModelProperty(value = "创建者")
	private String createBy;
	/**创建日期*/
	@Excel(name = "创建日期", width = 20, format = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建日期")
	private java.util.Date createDate;
	/**更新者*/
	//@Excel(name = "更新者", width = 15)
    @ApiModelProperty(value = "更新者")
	private String updateBy;
	/**更新日期*/
	@Excel(name = "更新日期", width = 20, format = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新日期")
	private java.util.Date updateDate;
	/**删除标记（0：正常；1：删除；2：审核）*/
	//@Excel(name = "删除标记（0：正常；1：删除；2：审核）", width = 15)
    @ApiModelProperty(value = "删除标记（0：正常；1：删除；2：审核）")
	private String delFlag;
	/**remarks*/
	@Excel(name = "备注", width = 15)
    @ApiModelProperty(value = "remarks")
	private String remarks;
	/**物业公司ID*/
	//@Excel(name = "物业公司ID", width = 15)
    @ApiModelProperty(value = "物业公司ID")
	private String tenantId;
	/**ticket*/
	//@Excel(name = "ticket", width = 15)
    @ApiModelProperty(value = "ticket")
	private String ticket;

	/*账单集合*/
	@TableField(exist = false)
	private List<ChargeBillsJump> billsList;
	/*票据详情*/
	@TableField(exist = false)
	private ChargeInvoiceInfo inf = new ChargeInvoiceInfo();
	/*票据详情集合*/
	@TableField(exist = false)
	private List<ChargeInvoiceInfo> infoList;
	/*收款方式集合*/
	@TableField(exist = false)
	private List<String> paymeYhods;
	/*收费项目编号集合*/
	@TableField(exist = false)
	private List<String> feeIds;
	/*开始日期*/
	@TableField(exist = false)
	private String startSkrq;
	/*结束日期*/
	@TableField(exist = false)
	private String endSkrq;
	//是否打印收据 0：无需打印 1：打印
	@TableField(exist = false)
	private String printArea;
	//大写合计金额
	@TableField(exist = false)
	private String feeCurrent;
	//票据类型
	@TableField(exist = false)
	private String invoiceType;
	//票据簿编号集合
	@TableField(exist = false)
	private String [] invoiceDms;
	//日常收费 ： 0  ，其他收费 ： 1
	@TableField(exist = false)
	private String isDay;

	@ApiModelProperty(value = "支付码")
	@TableField(exist = false)
	private String payQRCode;

	//收入
	@TableField(exist = false)
	@Excel(name = "收入", width = 15)
	private Double income;

	/*项目编号集合*/
	@TableField(exist = false)
	private List<String> projectIds;

	/*票据收费的详情*/
	@TableField(exist = false)
	private ChargeBillsJumpAll chargeBillsJumpAll=new ChargeBillsJumpAll();

	/*优惠金额*/
	@TableField(exist = false)
	private double reduced;

	/*应收金额*/
	@TableField(exist = false)
	private double due;

	/* 收费项*/
	private String feeItemId;

	/* 房间id*/
	@TableField(exist = false)
	private String roomId;

	//账单提交用户类型 1租赁  2住户
	@TableField(exist = false)
	private String types;

	public String getPayMethodStr() {
		return PayTypeEnum.getDesc(this.payMethod);
	}
}
